#
# Soul Test Suite
# EOL Test
#

require 'soul/core'
require 'test/unit'


class EOLTest < Test::Unit::TestCase

	include Soul

	def test_special
		assert(eol.parse("\n").success)
		assert(any.parse("a").success)
		assert(any.parse('').success == false)
		assert(nothing.parse('').success)
		assert(nothing.parse('HAHA').success == false)
	end

	def test_char
		assert(space.parse(" ").success)
		assert(space.parse("\t").success)
	end

	def test_rule
		assert( (space >> eol).parse(" \n").success)
		assert( (space >> eol >> space).parse(" \n\t").success)
	end

end

